package example.pattern.state;

public class UpperState implements State {

	@Override
	public void print(StateContext sc, String str) {
		System.out.println("upper: " + str.toUpperCase());
		if(sc.getCounter() % 3 == 0){
			sc.setState(new LowerState());
		}
	}

}
